package com.itheima.edu.info.subwaymanager.entry;

import com.itheima.edu.info.subwaymanager.controller.LoginControllerImpl;
import com.itheima.edu.info.subwaymanager.controller.SubwayControllerImpl;

import java.util.Scanner;

/**
 * @Author 王加鑫
 * @Date 2021/5/22 12:37
 * @Version 1.0
 * 地铁系统启动类
 */
public class InfoManager {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("--------欢迎来到地铁信息管理系统--------");
        new LoginControllerImpl().login();
        SubwayControllerImpl subwayController = new SubwayControllerImpl();
        while (true){
            System.out.println("1.查看地铁站 2.添加地铁站 3.退出系统");
            String choice = sc.next();
            switch (choice){
                case "1":
                    subwayController.selectSubway();
                    break;
                case "2":
                    subwayController.addSubway();
                    break;
                case "3":
                    System.out.println("退出系统");
                    System.exit(0);
                default:
                    System.out.println("您的输入有误");
            }
        }
    }
}
